﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace RoundupReadyPlusWPF.Controls
{
    /// <summary>
    /// Interaction logic for StepRadioButton.xaml
    /// </summary>
    public partial class StepRadioButton : UserControl
    {
        public StepRadioButton()
        {
            InitializeComponent();
        }

        public String ContentLabel
        {
            get
            {
                return radioButton.Content.ToString();
            }
            set
            {
                radioButton.Content = value;
            }
        }

        public bool? IsChecked
        {
            get
            {
                return radioButton.IsChecked;
            }
            set
            {
                radioButton.IsChecked = value;
            }
        }

        public event RoutedEventHandler Click;
        

        private void radioButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.Click != null)
                this.Click(this, e);
        }

        public event RoutedEventHandler Checked;

        private void radioButton_Checked(object sender, RoutedEventArgs e)
        {
            if (this.Checked != null)
                this.Checked(this, e);
        }


    }
}
